package com.tcd.customer.mapper;


import com.tcd.pojo.Client.PolicyholdersInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface  PolicyholdersInfoMapper {

    List<PolicyholdersInfo> getId(String policyholdersId);
    @Select("select * from policyholders_info")
    List<PolicyholdersInfo> getAll();

    List<PolicyholdersInfo> query(String policyholdersName, String policyholdersId);
    @Insert("INSERT INTO policyholders_info VALUES(#{policyholdersId},#{policyholdersName},#{sex},#{credentialsType},#{credenId},#{telephone},#{address},#{createTime},NULL)")
    int addPolicyholdersInfo(PolicyholdersInfo policyholdersInfo);
    @Delete("DELETE FROM policyholders_info WHERE policyholders_Id=#{policyholdersId}")
    int deleteRow(int policyholdersId);
    @Update("UPDATE policyholders_info SET policyholders_Name=#{policyholdersName},sex=#{sex},credentials_Type=#{credentialsType},creden_Id=#{credenId},telephone=#{telephone},address=#{address},update_time=#{updateTime} WHERE policyholders_Id=#{policyholdersId}")
    int amendRow(PolicyholdersInfo policyholdersInfo);

    List<PolicyholdersInfo> getpolicyholdersName();
}
